<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<!-- <meta http-equiv="refresh" content="1"> --> 
		<title>Operate Cells</title>
		<script type="text/javascript" language="java">
			function insertcell(){
				var tr = document.getElementById("myroll").cloneNode(true);
				document.getElementById("table1").appendChild(tr);
			}
			
			function deletecell(){
				table1.deleteRow(0);
			}
			
			function myclock(){
				var date = new Date();
				clock.innerHTML = date.getYear()+"年"+date.getMonth()+"月"+date.getDate()+" "+
				date.getHours()+":"+date.getMinutes()+":"+date.getSeconds();
				setTimeout("myclock()", 1000);
				//open("c:/users/dong/desktop/1.txt");
				//location="c:/users/dong/desktop/1.txt";
				
			}
			
			function autocheck(){
				ch.checked=(ch.checked)?false:true;
			}
		</script>
	</head>
	<body onload="myclock()">
		<label id="clock" ></label><br>
		<input type="button" value="插入" onclick="insertcell()">
		<input type="button" value="删除" onclick="deletecell()">
		<input type="button" value="选择" onclick="autocheck()">
		<table id="table1" bordercolor="red" border="1" cellspacing="0" >
			<tr id="myroll" >
				<td><input id="ch" type="checkbox"></td>
				<td><input type="text">上海</td>
				<td><input type="hidden"></td>
				<td><input type="text">杭州</td>
			</tr>
		</table>
	</body>
</html>